﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;

namespace NewsReaderApp.Views
{
    class CustomFlipView :FlipView
    {
        public void ActionSelectedItemView(Action<DependencyObject> action)
        {
            if (SelectedItem == null)
                return;

            var element = this.ItemContainerGenerator.ContainerFromItem(SelectedItem);
            if (element != null)
            {
                action(element);
            }
        }
    }
}
